import request from './api'

// 用户登录
export function login(data) {
    return request({
        url: '/user/login',
        method: 'post',
        data,
    })
}

// 获取用户信息
export function getUserInfo() {
    return request({
        url: '/user/info',
        method: 'get',
    })
}

// 获取卡片列表
export function getCards() {
    return request({
        url: '/cards',
        method: 'get',
    })
}

// 获取交易记录
export function getTransactions(params) {
    return request({
        url: '/transactions',
        method: 'get',
        params,
    })
}

// 账户充值
export function rechargeAccount(data) {
    return request({
        url: '/account/recharge',
        method: 'post',
        data,
    })
}

// 卡片充值
export function rechargeCard(data) {
    return request({
        url: '/card/recharge',
        method: 'post',
        data,
    })
}